package main

func numSubarrayProductLessThanK(nums []int, k int) int {
	left := 0
	right := 0
	prod := 1
	ans := 0
	for right < len(nums) {
		prod *= nums[right]
		for left <= right && prod >= k {
			prod /= nums[left]
			left++
		}
		ans += right - left + 1
		right++
	}
	return ans
}

func main() {
	// [10]
	// [10, 5], [5]
	// [10, 5, 2], [5, 2], [2]
	// [5, 2, 6], [2, 6], [6]
	// ans := numSubarrayProductLessThanK([]int{10, 5, 2, 6}, 100)
	// println(ans)
	// println(numSubarrayProductLessThanK([]int{1, 2, 3}, 0))
	m1 := map[int]int {1:1, 2:3}
	go func ()  {
		for i := 0; i < 100; i++{
			print(m1[1])
		}
	}()
	go func ()  {
		for i := 0; i < 100; i++{
			print(m1[2])
		}
	}()
	<-make(chan struct{})
}
